//创建方式有两种，方法，has ,foreach, add, clear, size, delete, 
let set = new Set();
set.add(123)
console.log(set)

let set2 = new Set([1,2,3,4])

set2.forEach(item => {
    console.log(item)
})
console.log(set2.size)
set2.delete(2)
console.log(set2.has(2));
console.log(set2.clear());
console.log("*******");
// 创建map 
let map = new Map([['key','value'],['key2','value2'],['key3','value3']])

map.set('key4','value4')
console.log(map.has('key5'));
map.forEach((key,value)=>{
    console.log(key,value)
})
console.log(map);
for(value of map.values()){
    console.log(value)
}
for(value of map.keys()){
    console.log(value)
}
for(value of map.entries()){
    console.log(value)
}